using System;

using CrystalDecisions.Shared;

namespace CrystalDecisions.CrystalReports.Engine
{
	/// <summary>
	/// Summary description for Tools.
	/// </summary>
	public class Tools
	{
		private Tools()
		{
		}

    public static void ApplyParamToReport(ReportClass rpt, string param, object paramValue)
    {
      ParameterFieldDefinitions pfd = rpt.DataDefinition.ParameterFields;

      ParameterFieldDefinition clientid = pfd[param];
      ParameterValues clientideval = clientid.CurrentValues;
      ParameterDiscreteValue discreteclientid = new ParameterDiscreteValue();

      discreteclientid.Value = paramValue;

      clientideval.Add(discreteclientid);
      clientid.ApplyCurrentValues(clientideval);
    }
	}
}
